﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WpfPdfReader
{
    public class BookMark : IEquatable<BookMark>
    {
        public string Name { get; set; }
        public string PageBmpPath { get; set; }
        public int Page { get; set; }
        public string Note { get; set; }
        public override string ToString()
        {
            return string.Format(
                "<BookMark>\n" +
                "<PageBmpPath>{0}</PageBmpPath>\n" +
                "<Page>{1}</Page>\n" +
                "<Name>{2}</Name>\n" +
                "<Note>{3}</Note>\n" +
                 "</BookMark>\n", PageBmpPath, Page, Name, Note);

        }

        public bool Equals(BookMark other)
        {
            if (other == null)
                return false;
            return this.Name == other.Name &&
                this.Page == other.Page &&
                this.Note == other.Note &&
                this.PageBmpPath == other.PageBmpPath;
        }
    }
}
